package javafx.com;

import javafx.application.Application;
import javafx.geometry.Rectangle2D;
import javafx.stage.Screen;
import javafx.stage.Stage;

public class main extends Application {

	@Override
	public void start(Stage primaryStage) throws Exception {
		// 获取屏幕
		Screen screen = Screen.getPrimary();
		
		Rectangle2D bounds = screen.getBounds();
		
		Rectangle2D visualBounds = screen.getVisualBounds();
		
		// 全部屏幕宽高坐标
		System.out.println("全部屏幕宽高");
		System.out.println("左上角x= "+bounds.getMinX()+"  "+"左上角y= "+bounds.getMinY());
		System.out.println("右下角x= "+bounds.getMaxX()+"  "+"右下角y= "+bounds.getMaxY());
		System.out.println("宽度= "+bounds.getWidth()+"  "+"高度= "+bounds.getHeight());
		
		System.out.println("可视屏幕宽高");
		System.out.println("左上角x= "+visualBounds.getMinX()+"  "+"左上角y= "+visualBounds.getMinY());
		System.out.println("右下角x= "+visualBounds.getMaxX()+"  "+"右下角y= "+visualBounds.getMaxY());
		System.out.println("宽度= "+visualBounds.getWidth()+"  "+"高度= "+visualBounds.getHeight());
		
	}
	
	public static void main(String[] args) {
		launch(args);
	}
}
